# 1 "/root/.topspin-BladeEpu/local_acqu/ppDirs/cp_presat.fb"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/root/.topspin-BladeEpu/local_acqu/ppDirs/cp_presat.fb"
;cp with 1H presto
;
;TS3 / 03.06.2011
;
;basic cp experiment
;written by HF 1.3.2001
;changed by JOS 05/06/03
;comments added by STE 4.4.2006 and HF 16.06.2010
;checked by SEWE 03.06.2011
;
;Avance III version
;parameters: 
;p3 : proton 90 at power level PLW12
;p15 : contact time at PLW1(f1) and SPW0(f2)
;pl1 : X power level during contact
;pl2 : =0, not used
;pl12 : decoupling power level (if not PLW13)
;pl13 : special decoupling power level
;sp0 : proton power level during contact
;cnst21 : on resonance, usually = 0
;cpdprg2 : e.g. cw, spinal64 (at PLW12)
;d2 : buildup time
;pcpd2 : pulse length in decoupling sequence
;spnam0 : use e.g. ramp.100 or ramp90100.100 for variable amplitude CP
;zgoptns : -Dfslg, -Dlacq, -Dlcp15 or blank
;
;
;$CLASS=Solids
;$DIM=1D
;$TYPE=cross polarisation
;$SUBTYPE=simple 1D
;$COMMENT=basic cp experiment, arbitrary contact and decoupling schemes


prosol relations=<solids_cp>
# 1 "/root/.topspin-BladeEpu/local_acqu/ppDirs/Avancesolids.incl" 1
;Avancesolids.incl
;   for AV 4
;
;avance-version (15/09/23)
;
;$CLASS=Solids INCL
;$COMMENT=definitions for setrtp and setnmr


# 13 "/root/.topspin-BladeEpu/local_acqu/ppDirs/Avancesolids.incl"
;generate dwell clock


# 20 "/root/.topspin-BladeEpu/local_acqu/ppDirs/Avancesolids.incl"
;gating pulse for RX, ADC and HPPR auto mode


# 41 "/root/.topspin-BladeEpu/local_acqu/ppDirs/Avancesolids.incl"
;define data sampling for WAHUHA type experiments, 
;   samples analogue or digitally for d9, closes receiver


# 47 "/root/.topspin-BladeEpu/local_acqu/ppDirs/Avancesolids.incl"
;explicit transmitter blanking, not supported yet

;NCO switching, to be implemented

# 60 "/root/.topspin-BladeEpu/local_acqu/ppDirs/Avancesolids.incl"
;$Id: Avancesolids4.incl,v 1.3 2015/09/23 17:38:52 ber Exp $
# 38 "/root/.topspin-BladeEpu/local_acqu/ppDirs/cp_presat.fb" 2

# 47 "/root/.topspin-BladeEpu/local_acqu/ppDirs/cp_presat.fb"

"acqt0=0" ;defines t=0 for baseopt
# 50 "/root/.topspin-BladeEpu/local_acqu/ppDirs/cp_presat.fb"
# 50 "/root/.topspin-BladeEpu/local_acqu/ppDirs/cp_presat.fb"
1 ze

			;disable protection for long contact time.

# 1 "/root/.topspin-BladeEpu/local_acqu/ppDirs/p15_prot.incl" 1
;p15_prot.incl
;avance-version (13/01/29)
;Test the rf on-time and duty cycle
;protect against too long contact time
;Test the rf on-time and duty cycle 
;
;$CLASS=Solids INCL
;$COMMENT=protect against too long contact time
# 11 "/root/.topspin-BladeEpu/local_acqu/ppDirs/p15_prot.incl"
1m
if "p15 < 10.1m" goto Passp15
2u
print "contact time exceeds 10msec limit!"
goto HaltAcqu
Passp15, 1m


# 20 "/root/.topspin-BladeEpu/local_acqu/ppDirs/p15_prot.incl"
;$Id: p15_prot.incl,v 1.8 2013/01/29 15:40:14 ber Exp $
# 54 "/root/.topspin-BladeEpu/local_acqu/ppDirs/cp_presat.fb" 2
			;make sure p15 does not exceed 10 msec	
			;let supervisor change this pulseprogram if 
			;more is needed


# 60 "/root/.topspin-BladeEpu/local_acqu/ppDirs/cp_presat.fb"
			;disable protection file for long acquisition change decoupling power !!! or you risk probe damage
			;if you set the label lacq (ZGOPTNS -Dlacq), the protection is disabled


# 1 "/root/.topspin-BladeEpu/local_acqu/ppDirs/aq_prot.incl" 1
;aq_prot.incl
;avance-version (13/01/28)
;Test the rf on-time and duty cycle
;protect against too long acquisition time
# 6 "/root/.topspin-BladeEpu/local_acqu/ppDirs/aq_prot.incl"
;$CLASS=Solids INCL
;$COMMENT=protect against too long acquisition time

1m
if "aq < 50.1m" goto Passaq
2u 
print "acquisition time exceeds 50m limit!"
goto HaltAcqu
Passaq, 1m

;$Id: aq_prot.incl,v 1.8 2013/01/28 17:39:02 ber Exp $
# 64 "/root/.topspin-BladeEpu/local_acqu/ppDirs/cp_presat.fb" 2
			;allows max. 50 msec acquisition time, supervisor
			;may change  to max. 1s at less than 5 % duty cycle
			;and reduced decoupling field
# 69 "/root/.topspin-BladeEpu/local_acqu/ppDirs/cp_presat.fb"
2 10m do:f2 

3 d20 pl12:f2
  (p3 pl12 ph1):f2	
  lo to 3 times l20 
4 d2 
  1u fq=cnst21:f2
  (p3 pl12 ph1):f2
  (p15 pl1 ph2):f1 (p15:sp0 ph10):f2
  1u cpds2:f2 		;pl12 is used here with tppm, spinal, pl13 with cwlg, cwlgs
  go=2 ph31
  1m do:f2
  wr #0
HaltAcqu, 1m
exit

ph0= 0
ph1= 1 3
ph2= 0 0 2 2 1 1 3 3
ph10= 0
ph31= 0 2 2 0 1 3 3 1
# 91 "/root/.topspin-BladeEpu/local_acqu/ppDirs/cp_presat.fb"
;$id: $
